package com.starblink.guangconfig.ui.part

import android.content.Context
import androidx.lifecycle.viewModelScope
import com.starblink.android.basic.ext.toast
import com.starblink.android.basic.guide.SkNoviceManage
import com.starblink.android.basic.guide.bean.SkGuideEnum
import com.starblink.android.basic.util.FlowCountDownTimer
import com.starblink.android.basic.util.bus.FlowBus
import com.starblink.android.basic.util.bus.FlowConst
import com.starblink.basic.util.ActivityStackManage
import com.starblink.guangconfig.databinding.ActivityGuangUpConfigBinding
import com.starblink.guangconfig.ui.GuangUpConfigVM

object NoviceGuidePart {

    fun handleVM(context: Context, m: GuangUpConfigVM, vb: ActivityGuangUpConfigBinding) {
        vb.noviceGuide.noviceGuideOpen.isChecked = false
        vb.noviceGuide.noviceGuideOpen.setOnClickListener {
            vb.noviceGuide.noviceGuideOpen.isChecked = true
            SkNoviceManage.resetVoiceGuide()
            toast("已重置新手引导 2s后重启")
            FlowCountDownTimer(time = 2).start(callBack = {
            }, onFinish = {
                ActivityStackManage.killAppAndRestart()
            })
        }
    }

}